---
title: "SQL-012: Select all task source codes"
summary: Retrieve the full TASK_SOURCE_CODE reference list ordered by description.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks
reference_type: embedded
---

# SQL-012 Select all task source codes

Retrieves the complete `TASK_SOURCE_CODE` reference list, ordered by description.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-012 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]`** |
| **Command type** | Text |
| **Business object** | `clsTaskSourceCodeCollection` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` / `AfterRetrieve` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [TASK_SOURCE_CODE](../database-tables.md#task_source_code) | SELECT | `CODE`, `CODE_DESCR` |

## Sample SQL

```sql
SELECT
  TASK_SOURCE_CODE.CODE AS Code,
  TASK_SOURCE_CODE.CODE_DESCR AS CodeDescr
FROM
  TASK_SOURCE_CODE
ORDER BY
  CODE_DESCR
```

## Operations and processes
- [Load a code table](../operations/load-code-table.md)

## Business rules
- [BR-023: Code tables are read-only reference data](../business-rules.md#br-023-code-tables-are-read-only-reference-data)
- [BR-025: Unrecognized codes map to a safe default](../business-rules.md#br-025-unrecognized-codes-map-to-a-safe-default)

## Sources
- SAIF.Business.Tasks/clsTaskSourceCodeCollection.vb
